

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="zh-CN" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="zh-CN" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>snowboy.snowboydetect &mdash; wukong-robot 1.2.0 文档</title>
  

  
  
  
  

  
  <script type="text/javascript" src="../../_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script type="text/javascript" src="../../_static/jquery.js"></script>
        <script type="text/javascript" src="../../_static/underscore.js"></script>
        <script type="text/javascript" src="../../_static/doctools.js"></script>
        <script type="text/javascript" src="../../_static/language_data.js"></script>
        <script type="text/javascript" src="../../_static/translations.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <link rel="index" title="索引" href="../../genindex.html" />
    <link rel="search" title="搜索" href="../../search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../index.html" class="icon icon-home"> wukong-robot
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"></div>
            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../index.html">wukong-robot</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../index.html">模块代码</a> &raquo;</li>
        
      <li>snowboy.snowboydetect</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <h1>snowboy.snowboydetect 源代码</h1><div class="highlight"><pre>
<span></span><span class="c1"># This file was automatically generated by SWIG (http://www.swig.org).</span>
<span class="c1"># Version 3.0.12</span>
<span class="c1">#</span>
<span class="c1"># Do not make changes to this file unless you know what you are doing--modify</span>
<span class="c1"># the SWIG interface file instead.</span>

<span class="kn">from</span> <span class="nn">sys</span> <span class="k">import</span> <span class="n">version_info</span> <span class="k">as</span> <span class="n">_swig_python_version_info</span>
<span class="k">if</span> <span class="n">_swig_python_version_info</span> <span class="o">&gt;=</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">0</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">swig_import_helper</span><span class="p">():</span>
        <span class="kn">import</span> <span class="nn">importlib</span>
        <span class="n">pkg</span> <span class="o">=</span> <span class="vm">__name__</span><span class="o">.</span><span class="n">rpartition</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
        <span class="n">mname</span> <span class="o">=</span> <span class="s1">&#39;.&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">((</span><span class="n">pkg</span><span class="p">,</span> <span class="s1">&#39;_snowboydetect&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">lstrip</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">importlib</span><span class="o">.</span><span class="n">import_module</span><span class="p">(</span><span class="n">mname</span><span class="p">)</span>
        <span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">importlib</span><span class="o">.</span><span class="n">import_module</span><span class="p">(</span><span class="s1">&#39;_snowboydetect&#39;</span><span class="p">)</span>
    <span class="n">_snowboydetect</span> <span class="o">=</span> <span class="n">swig_import_helper</span><span class="p">()</span>
    <span class="k">del</span> <span class="n">swig_import_helper</span>
<span class="k">elif</span> <span class="n">_swig_python_version_info</span> <span class="o">&gt;=</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">0</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">swig_import_helper</span><span class="p">():</span>
        <span class="kn">from</span> <span class="nn">os.path</span> <span class="k">import</span> <span class="n">dirname</span>
        <span class="kn">import</span> <span class="nn">imp</span>
        <span class="n">fp</span> <span class="o">=</span> <span class="kc">None</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="n">fp</span><span class="p">,</span> <span class="n">pathname</span><span class="p">,</span> <span class="n">description</span> <span class="o">=</span> <span class="n">imp</span><span class="o">.</span><span class="n">find_module</span><span class="p">(</span><span class="s1">&#39;_snowboydetect&#39;</span><span class="p">,</span> <span class="p">[</span><span class="n">dirname</span><span class="p">(</span><span class="vm">__file__</span><span class="p">)])</span>
        <span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
            <span class="kn">import</span> <span class="nn">_snowboydetect</span>
            <span class="k">return</span> <span class="n">_snowboydetect</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="n">_mod</span> <span class="o">=</span> <span class="n">imp</span><span class="o">.</span><span class="n">load_module</span><span class="p">(</span><span class="s1">&#39;_snowboydetect&#39;</span><span class="p">,</span> <span class="n">fp</span><span class="p">,</span> <span class="n">pathname</span><span class="p">,</span> <span class="n">description</span><span class="p">)</span>
        <span class="k">finally</span><span class="p">:</span>
            <span class="k">if</span> <span class="n">fp</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
                <span class="n">fp</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
        <span class="k">return</span> <span class="n">_mod</span>
    <span class="n">_snowboydetect</span> <span class="o">=</span> <span class="n">swig_import_helper</span><span class="p">()</span>
    <span class="k">del</span> <span class="n">swig_import_helper</span>
<span class="k">else</span><span class="p">:</span>
    <span class="kn">import</span> <span class="nn">_snowboydetect</span>
<span class="k">del</span> <span class="n">_swig_python_version_info</span>

<span class="k">try</span><span class="p">:</span>
    <span class="n">_swig_property</span> <span class="o">=</span> <span class="nb">property</span>
<span class="k">except</span> <span class="ne">NameError</span><span class="p">:</span>
    <span class="k">pass</span>  <span class="c1"># Python &lt; 2.2 doesn&#39;t have &#39;property&#39;.</span>

<span class="k">try</span><span class="p">:</span>
    <span class="kn">import</span> <span class="nn">builtins</span> <span class="k">as</span> <span class="nn">__builtin__</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
    <span class="kn">import</span> <span class="nn">__builtin__</span>

<span class="k">def</span> <span class="nf">_swig_setattr_nondynamic</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">class_type</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">static</span><span class="o">=</span><span class="mi">1</span><span class="p">):</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">name</span> <span class="o">==</span> <span class="s2">&quot;thisown&quot;</span><span class="p">):</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">own</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">name</span> <span class="o">==</span> <span class="s2">&quot;this&quot;</span><span class="p">):</span>
        <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;SwigPyObject&#39;</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">[</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
            <span class="k">return</span>
    <span class="n">method</span> <span class="o">=</span> <span class="n">class_type</span><span class="o">.</span><span class="n">__swig_setmethods__</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">method</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">method</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
    <span class="k">if</span> <span class="p">(</span><span class="ow">not</span> <span class="n">static</span><span class="p">):</span>
        <span class="k">if</span> <span class="n">_newclass</span><span class="p">:</span>
            <span class="nb">object</span><span class="o">.</span><span class="fm">__setattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">[</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s2">&quot;You cannot add attributes to </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="bp">self</span><span class="p">)</span>


<span class="k">def</span> <span class="nf">_swig_setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">class_type</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
    <span class="k">return</span> <span class="n">_swig_setattr_nondynamic</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">class_type</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>


<span class="k">def</span> <span class="nf">_swig_getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">class_type</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">name</span> <span class="o">==</span> <span class="s2">&quot;thisown&quot;</span><span class="p">):</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">own</span><span class="p">()</span>
    <span class="n">method</span> <span class="o">=</span> <span class="n">class_type</span><span class="o">.</span><span class="n">__swig_getmethods__</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">method</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">method</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
    <span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s2">&quot;&#39;</span><span class="si">%s</span><span class="s2">&#39; object has no attribute &#39;</span><span class="si">%s</span><span class="s2">&#39;&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">class_type</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">name</span><span class="p">))</span>


<span class="k">def</span> <span class="nf">_swig_repr</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="n">strthis</span> <span class="o">=</span> <span class="s2">&quot;proxy of &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="fm">__repr__</span><span class="p">()</span>
    <span class="k">except</span> <span class="n">__builtin__</span><span class="o">.</span><span class="n">Exception</span><span class="p">:</span>
        <span class="n">strthis</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
    <span class="k">return</span> <span class="s2">&quot;&lt;</span><span class="si">%s</span><span class="s2">.</span><span class="si">%s</span><span class="s2">; </span><span class="si">%s</span><span class="s2"> &gt;&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__module__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">strthis</span><span class="p">,)</span>

<span class="k">try</span><span class="p">:</span>
    <span class="n">_object</span> <span class="o">=</span> <span class="nb">object</span>
    <span class="n">_newclass</span> <span class="o">=</span> <span class="mi">1</span>
<span class="k">except</span> <span class="n">__builtin__</span><span class="o">.</span><span class="n">Exception</span><span class="p">:</span>
    <span class="k">class</span> <span class="nc">_object</span><span class="p">:</span>
        <span class="k">pass</span>
    <span class="n">_newclass</span> <span class="o">=</span> <span class="mi">0</span>

<div class="viewcode-block" id="SnowboyDetect"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect">[文档]</a><span class="k">class</span> <span class="nc">SnowboyDetect</span><span class="p">(</span><span class="n">_object</span><span class="p">):</span>
    <span class="n">__swig_setmethods__</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="fm">__setattr__</span> <span class="o">=</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">:</span> <span class="n">_swig_setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">SnowboyDetect</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
    <span class="n">__swig_getmethods__</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="fm">__getattr__</span> <span class="o">=</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">:</span> <span class="n">_swig_getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">SnowboyDetect</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span>
    <span class="fm">__repr__</span> <span class="o">=</span> <span class="n">_swig_repr</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">resource_filename</span><span class="p">,</span> <span class="n">model_str</span><span class="p">):</span>
        <span class="n">this</span> <span class="o">=</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">new_SnowboyDetect</span><span class="p">(</span><span class="n">resource_filename</span><span class="p">,</span> <span class="n">model_str</span><span class="p">)</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
        <span class="k">except</span> <span class="n">__builtin__</span><span class="o">.</span><span class="n">Exception</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">this</span> <span class="o">=</span> <span class="n">this</span>

<div class="viewcode-block" id="SnowboyDetect.Reset"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.Reset">[文档]</a>    <span class="k">def</span> <span class="nf">Reset</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_Reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.RunDetection"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.RunDetection">[文档]</a>    <span class="k">def</span> <span class="nf">RunDetection</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_RunDetection</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.SetSensitivity"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.SetSensitivity">[文档]</a>    <span class="k">def</span> <span class="nf">SetSensitivity</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sensitivity_str</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_SetSensitivity</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sensitivity_str</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.SetHighSensitivity"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.SetHighSensitivity">[文档]</a>    <span class="k">def</span> <span class="nf">SetHighSensitivity</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">high_sensitivity_str</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_SetHighSensitivity</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">high_sensitivity_str</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.GetSensitivity"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.GetSensitivity">[文档]</a>    <span class="k">def</span> <span class="nf">GetSensitivity</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_GetSensitivity</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.SetAudioGain"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.SetAudioGain">[文档]</a>    <span class="k">def</span> <span class="nf">SetAudioGain</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">audio_gain</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_SetAudioGain</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">audio_gain</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.UpdateModel"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.UpdateModel">[文档]</a>    <span class="k">def</span> <span class="nf">UpdateModel</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_UpdateModel</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.NumHotwords"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.NumHotwords">[文档]</a>    <span class="k">def</span> <span class="nf">NumHotwords</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_NumHotwords</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.ApplyFrontend"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.ApplyFrontend">[文档]</a>    <span class="k">def</span> <span class="nf">ApplyFrontend</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">apply_frontend</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_ApplyFrontend</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">apply_frontend</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.SampleRate"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.SampleRate">[文档]</a>    <span class="k">def</span> <span class="nf">SampleRate</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_SampleRate</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.NumChannels"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.NumChannels">[文档]</a>    <span class="k">def</span> <span class="nf">NumChannels</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_NumChannels</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyDetect.BitsPerSample"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyDetect.BitsPerSample">[文档]</a>    <span class="k">def</span> <span class="nf">BitsPerSample</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_BitsPerSample</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>
    <span class="n">__swig_destroy__</span> <span class="o">=</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">delete_SnowboyDetect</span>
    <span class="fm">__del__</span> <span class="o">=</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="kc">None</span></div>
<span class="n">SnowboyDetect_swigregister</span> <span class="o">=</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyDetect_swigregister</span>
<span class="n">SnowboyDetect_swigregister</span><span class="p">(</span><span class="n">SnowboyDetect</span><span class="p">)</span>

<div class="viewcode-block" id="SnowboyVad"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad">[文档]</a><span class="k">class</span> <span class="nc">SnowboyVad</span><span class="p">(</span><span class="n">_object</span><span class="p">):</span>
    <span class="n">__swig_setmethods__</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="fm">__setattr__</span> <span class="o">=</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">:</span> <span class="n">_swig_setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">SnowboyVad</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
    <span class="n">__swig_getmethods__</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="fm">__getattr__</span> <span class="o">=</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">:</span> <span class="n">_swig_getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">SnowboyVad</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span>
    <span class="fm">__repr__</span> <span class="o">=</span> <span class="n">_swig_repr</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">resource_filename</span><span class="p">):</span>
        <span class="n">this</span> <span class="o">=</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">new_SnowboyVad</span><span class="p">(</span><span class="n">resource_filename</span><span class="p">)</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">this</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">this</span><span class="p">)</span>
        <span class="k">except</span> <span class="n">__builtin__</span><span class="o">.</span><span class="n">Exception</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">this</span> <span class="o">=</span> <span class="n">this</span>

<div class="viewcode-block" id="SnowboyVad.Reset"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad.Reset">[文档]</a>    <span class="k">def</span> <span class="nf">Reset</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_Reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyVad.RunVad"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad.RunVad">[文档]</a>    <span class="k">def</span> <span class="nf">RunVad</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_RunVad</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyVad.SetAudioGain"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad.SetAudioGain">[文档]</a>    <span class="k">def</span> <span class="nf">SetAudioGain</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">audio_gain</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_SetAudioGain</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">audio_gain</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyVad.ApplyFrontend"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad.ApplyFrontend">[文档]</a>    <span class="k">def</span> <span class="nf">ApplyFrontend</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">apply_frontend</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_ApplyFrontend</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">apply_frontend</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyVad.SampleRate"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad.SampleRate">[文档]</a>    <span class="k">def</span> <span class="nf">SampleRate</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_SampleRate</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyVad.NumChannels"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad.NumChannels">[文档]</a>    <span class="k">def</span> <span class="nf">NumChannels</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_NumChannels</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>

<div class="viewcode-block" id="SnowboyVad.BitsPerSample"><a class="viewcode-back" href="../../snowboy.html#snowboy.snowboydetect.SnowboyVad.BitsPerSample">[文档]</a>    <span class="k">def</span> <span class="nf">BitsPerSample</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_BitsPerSample</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>
    <span class="n">__swig_destroy__</span> <span class="o">=</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">delete_SnowboyVad</span>
    <span class="fm">__del__</span> <span class="o">=</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">:</span> <span class="kc">None</span></div>
<span class="n">SnowboyVad_swigregister</span> <span class="o">=</span> <span class="n">_snowboydetect</span><span class="o">.</span><span class="n">SnowboyVad_swigregister</span>
<span class="n">SnowboyVad_swigregister</span><span class="p">(</span><span class="n">SnowboyVad</span><span class="p">)</span>

<span class="c1"># This file is compatible with both classic and new-style classes.</span>


</pre></div>

           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019, wzpan

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>